package com.webapp.org.service;

import java.util.List;

import com.webapp.org.bean.CategoryBean;
import com.webapp.org.dao.CategoryDAO;
import com.webapp.org.interfaces.ICategory;


public class CategoryService implements ICategory
{

	@Override
	public boolean insertCategory(CategoryBean categoryBean)
	{
      CategoryDAO categoryDAO = new CategoryDAO();
      boolean result = categoryDAO.insertCategory(categoryBean);
	  return result;
	}

	@Override
	public boolean updateCategory(CategoryBean categoryBean)
	{
	      CategoryDAO categoryDAO = new CategoryDAO();
	      boolean result = categoryDAO.updateCategory(categoryBean);
		  return result;
	}

	@Override
	public boolean deleteCategory(int categoryId)
	{
	      CategoryDAO categoryDAO = new CategoryDAO();
	      boolean result = categoryDAO.deleteCategory(categoryId);
		  return result;
	}

	@Override
	public List<CategoryBean> retrieveCategory()
	{
		CategoryDAO categoryDAO = new CategoryDAO();
		List<CategoryBean> result = categoryDAO.retrieveCategory();
		return result;

	}

}
